package com.tpindividual.tpej1;

import android.os.Bundle;

import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.widget.EditText;
import android.widget.TextView;



public class ActivityOutput extends Activity {

	private Triangulo model;
	private MiVistaOutput view;
	private MiControllerOutput controller;
	
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_activity_output);
		model = new Triangulo();
        view = new MiVistaOutput(this, model);
        controller = new MiControllerOutput(model, view, this);		
        if (getIntent().getExtras() != null){
			Intent intent = getIntent();
			procesarRespuesta(intent);
        }
	}
        
	public void procesarRespuesta(Intent intent){
        controller.procesarRespuesta(intent);
    	
	}
	
	public MiVistaOutput getView(){
		return view;
	}
	
	public MiControllerOutput getController(){
		return controller;
	}
	
	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		getMenuInflater().inflate(R.menu.activity_output, menu);
		return true;
	}

}
